package com.delu.service.impl;

import com.delu.entity.Lease;
import com.delu.entity.RoundImg;
import com.delu.mapper.LeaseMapper;
import com.delu.service.LeaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LeaseServiceimpl implements LeaseService {

    @Autowired
    private LeaseMapper leaseMapper;

    @Override
    public List<Lease> leaseList() {
        return leaseMapper.selectList(null);
    }

    @Override
    public Integer addlease(Lease lease) {
        return leaseMapper.insert(lease);
    }

    @Override
    public Lease selectById(Integer leaseId) {
        Lease lease = leaseMapper.selectById(leaseId);
        return lease;
    }


    @Override
    public Integer deleteId(Integer leaseId) {
        return leaseMapper.deleteById(leaseId);
    }

    @Override
    public Integer updataLease(Lease lease) {
        return leaseMapper.updateById(lease);
    }
}
